package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.RentBillamountdetailMapper;
import com.rzl.expense.expense.domain.RentBillamountdetail;
import com.rzl.expense.expense.service.IRentBillamountdetailService;

/**
 * 房租缴费汇总明细Service业务层处理
 * 
 * @author expense
 * @date 2025-03-11
 */
@Service
public class RentBillamountdetailServiceImpl implements IRentBillamountdetailService 
{
    @Autowired
    private RentBillamountdetailMapper rentBillamountdetailMapper;

    /**
     * 查询房租缴费汇总明细
     * 
     * @param billamountdetailId 房租缴费汇总明细主键
     * @return 房租缴费汇总明细
     */
    @Override
    public RentBillamountdetail selectRentBillamountdetailByBillamountdetailId(String billamountdetailId)
    {
        return rentBillamountdetailMapper.selectRentBillamountdetailByBillamountdetailId(billamountdetailId);
    }

    /**
     * 查询房租缴费汇总明细列表
     * 
     * @param rentBillamountdetail 房租缴费汇总明细
     * @return 房租缴费汇总明细
     */
    @Override
    public List<RentBillamountdetail> selectRentBillamountdetailList(RentBillamountdetail rentBillamountdetail)
    {
        return rentBillamountdetailMapper.selectRentBillamountdetailList(rentBillamountdetail);
    }

    /**
     * 新增房租缴费汇总明细
     * 
     * @param rentBillamountdetail 房租缴费汇总明细
     * @return 结果
     */
    @Override
    public int insertRentBillamountdetail(RentBillamountdetail rentBillamountdetail)
    {
        rentBillamountdetail.setCreateTime(DateUtils.getNowDate());
        return rentBillamountdetailMapper.insertRentBillamountdetail(rentBillamountdetail);
    }

    /**
     * 修改房租缴费汇总明细
     * 
     * @param rentBillamountdetail 房租缴费汇总明细
     * @return 结果
     */
    @Override
    public int updateRentBillamountdetail(RentBillamountdetail rentBillamountdetail)
    {
        rentBillamountdetail.setUpdateTime(DateUtils.getNowDate());
        return rentBillamountdetailMapper.updateRentBillamountdetail(rentBillamountdetail);
    }

    /**
     * 批量删除房租缴费汇总明细
     * 
     * @param billamountdetailIds 需要删除的房租缴费汇总明细主键
     * @return 结果
     */
    @Override
    public int deleteRentBillamountdetailByBillamountdetailIds(String[] billamountdetailIds)
    {
        return rentBillamountdetailMapper.deleteRentBillamountdetailByBillamountdetailIds(billamountdetailIds);
    }

    /**
     * 删除房租缴费汇总明细信息
     * 
     * @param billamountdetailId 房租缴费汇总明细主键
     * @return 结果
     */
    @Override
    public int deleteRentBillamountdetail(String startDate,String endDate)
    {
        return rentBillamountdetailMapper.deleteRentBillamountdetail(startDate,endDate);
    }




    @Override
    public void batchRentBillamountdetail(List<RentBillamountdetail> list)
    {

         rentBillamountdetailMapper.batchRentBillamountdetail(list);
    }


}
